home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 January / macformat-020.iso / Shareware City / Graphics / EPS Fixer 1.1 ƒ / Scripting / Droppable EPS Fixer (text) next >
Encoding:
Text File  |  1994-10-01  |  874 b   |  31 lines  |  [TEXT/ToyS]

  1. on open fileDropList
  2.     tell application "EPS Fixer"
  3.         set theCount to count of fileDropList
  4.         set filesProcessed to 0
  5.         repeat with i from 1 to theCount
  6.             set theFile to item i of fileDropList
  7.             set theInfo to info for theFile
  8.             set theName to name of theInfo
  9.             set theType to file type of theInfo
  10.             if theType = "TEXT" or theType = "EPSF" then
  11.                 open theFile
  12.                 save document theName in theFile
  13.                 close document theName
  14.                 set filesProcessed to filesProcessed + 1
  15.             end if
  16.         end repeat
  17.         quit
  18.     end tell
  19.     if filesProcessed > 0 then
  20.         if filesProcessed is equal to 1 then
  21.             set resultString to "One file was processed."
  22.         else
  23.             set resultString to {theCount, " files were processed."} as string
  24.         end if
  25.     else
  26.         set resultString to {"No files were processed."} as string
  27.     end if
  28.     display dialog resultString buttons "OK" with icon 1 default button 1
  29.     
  30. end open
  31.